namespace RIS.TMP.WEB.APP.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AllContext8 : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.MRestoreToAdmin", "CCheckPlanId", c => c.Int(nullable: false));
            AddForeignKey("dbo.MRestoreToAdmin", "CCheckPlanId", "dbo.CCheckPlan", "ChpId", cascadeDelete: true);
            CreateIndex("dbo.MRestoreToAdmin", "CCheckPlanId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.MRestoreToAdmin", new[] { "CCheckPlanId" });
            DropForeignKey("dbo.MRestoreToAdmin", "CCheckPlanId", "dbo.CCheckPlan");
            DropColumn("dbo.MRestoreToAdmin", "CCheckPlanId");
        }
    }
}
